home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / simplemenp.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  4KB  |  102 lines

  1. /*
  2.  * $XConsortium: SimpleMenP.h,v 1.12 89/12/11 15:01:39 kit Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  */
  24.  
  25. /*
  26.  * SimpleMenuP.h - Private Header file for SimpleMenu widget.
  27.  *
  28.  * Date:    April 3, 1989
  29.  *
  30.  * By:      Chris D. Peterson
  31.  *          MIT X Consortium
  32.  *          kit@expo.lcs.mit.edu
  33.  */
  34.  
  35. #ifndef _SimpleMenuP_h
  36. #define _SimpleMenuP_h
  37.  
  38. #include <X11/Xaw/SimpleMenu.h>
  39. #include <X11/Xaw/SmeP.h>
  40. #include <X11/ShellP.h>
  41.  
  42. #define ForAllChildren(smw, childP) \
  43.   for ( (childP) = (SmeObject *) (smw)->composite.children ; \
  44.         (childP) < (SmeObject *) ( (smw)->composite.children + \
  45.                  (smw)->composite.num_children ) ; \
  46.         (childP)++ )
  47.  
  48. typedef struct {
  49.     XtPointer extension;        /* For future needs. */
  50. } SimpleMenuClassPart;
  51.  
  52. typedef struct _SimpleMenuClassRec {
  53.   CoreClassPart              core_class;
  54.   CompositeClassPart      composite_class;
  55.   ShellClassPart          shell_class;
  56.   OverrideShellClassPart  override_shell_class;
  57.   SimpleMenuClassPart      simpleMenu_class;
  58. } SimpleMenuClassRec;
  59.  
  60. extern SimpleMenuClassRec simpleMenuClassRec;
  61.  
  62. typedef struct _SimpleMenuPart {
  63.  
  64.   /* resources */
  65.  
  66.   String       label_string;    /* The string for the label or NULL. */
  67.   SmeObject   label;        /* If label_string is non-NULL then this is
  68.                    the label widget. */
  69.   WidgetClass  label_class;    /* Widget Class of the menu label object. */
  70.  
  71.   Dimension    top_margin;    /* Top and bottom margins. */
  72.   Dimension    bottom_margin;
  73.   Dimension    row_height;    /* height of each row (menu entry) */
  74.  
  75.   Cursor       cursor;        /* The menu's cursor. */
  76.   SmeObject popup_entry;    /* The entry to position the cursor on for
  77.                    when using XawPositionSimpleMenu. */
  78.   Boolean      menu_on_screen;    /* Force the menus to be fully on the screen.*/
  79.   int          backing_store;    /* What type of backing store to use. */
  80.  
  81.   /* private state */
  82.  
  83.   Boolean recursive_set_values;    /* contain a possible infinite loop. */
  84.  
  85.   Boolean menu_width;        /* If true then force width to remain 
  86.                    core.width */
  87.   Boolean menu_height;        /* Just like menu_width, but for height. */
  88.  
  89.   SmeObject entry_set;        /* The entry that is currently set or
  90.                    highlighted. */
  91. } SimpleMenuPart;
  92.  
  93. typedef struct _SimpleMenuRec {
  94.   CorePart        core;
  95.   CompositePart     composite;
  96.   ShellPart             shell;
  97.   OverrideShellPart     override;
  98.   SimpleMenuPart    simple_menu;
  99. } SimpleMenuRec;
  100.  
  101. #endif /* _SimpleMenuP_h */
  102.